$(function(){
    var mySwiper1 = new Swiper ('.swiper-container1', {
        loop: true,
        // 如果需要前进后退按钮
        nextButton: '.swiper-button-next1',
        prevButton: '.swiper-button-prev1',
    })
    var mySwiper2 = new Swiper ('.swiper-container2', {
        loop: true,
        // 如果需要前进后退按钮
        nextButton: '.swiper-button-next2',
        prevButton: '.swiper-button-prev2',
    })
    var swiper3 = new Swiper('.swiper-container3', {
        direction: 'vertical',
        pagination: '.swiper-pagination3',
        paginationClickable: true,
        mousewheelControl:true
    });
    var swiper4 = new Swiper('.swiper-container4', {
        loop: true,
        pagination: '.swiper-pagination4',
        paginationClickable: true,
        autoplay: 3000
    });
    $('.navList1 li').on('click',function () {
        var index = $(this).index();
        $(this).addClass('active').siblings().removeClass('active');
    })
    $('.navList2 li').on('click',function () {
        var index = $(this).index();
        $(this).addClass('active').siblings().removeClass('active');
    })
    $('.nav2 li').on('click',function () {
        var index = $(this).index();
        $(this).addClass('active').siblings().removeClass('active');
    })
    $('.nav1 li').on('click',function () {
        var index = $(this).index();
        $(this).addClass('active').siblings().removeClass('active');
        if(index == 0){
            $('.zb_list1').show()
            $('.zb_list2').hide()
            $('.gridster ul.gridsterList1').show().siblings().hide()
            $('.dt_slide > img').attr('src','content/default/image/sec5_img.png')            
        }
        if(index == 1){
            $('.zb_list1').hide()
            $('.zb_list2').show()
            $('.gridster ul.gridsterList2').show().siblings().hide()
            $('.dt_slide > img').attr('src','content/default/image/profession.png')
        }
        if(index == 2){
            $('.zb_list1').hide()
            $('.zb_list2').show()
            $('.gridster ul.gridsterList2').show().siblings().hide()
        }
        if(index == 3){
            $('.zb_list1').hide()
            $('.zb_list2').show()
            $('.gridster ul.gridsterList3').show().siblings().hide()
        }
        if(index == 4){
            $('.zb_list1').hide()
            $('.zb_list2').show()
            $('.gridster ul.gridsterList4').show().siblings().hide()
        }
    })
    $('.sortImg').hover(function(){
        $(this).attr('src','content/default/image/head/sort2.png')
    },function(){
        $(this).attr('src','content/default/image/head/sort_07.jpg')
    })
})